{{ $current_page := . }}

<div class="docs container">
  <div class="row flex-xl-nowrap">
    <div class="docs-sidebar col-12 col-md-3 col-xl-3">
      {{ partial "docs_sidebar" . }}
    </div>

    {{ if .Params.toc }}
    <div class="docs-toc d-none d-xl-block col-xl-2">
      <ul class="nav toc-top">
        <li><a href="#" id="back_to_top" class="docs-toc-title">{{ i18n "on_this_page" }}</a></li>
      </ul>

      {{ .TableOfContents }}

      {{ partial "docs_toc_foot" . }}
    </div>
    {{ end }}

    <style>
      @media (min-width:1140px) {
        .docs-sidebar {
          flex: 0 1 320px;
        }
        .docs-toc {
          flex: 0 1 280px;
        }
        main.docs-content.no-docs-toc {
          padding-bottom: 0 !important;
          max-width: calc(100% - 320px) !important;
          flex: 0 1 calc(100% - 320px);
          width: 100%;
        }
        main.docs-content {
          padding-bottom: 0 !important;
          max-width: calc(100% - 600px) !important;
          flex: 0 1 calc(100% - 600px);
          width: 100%;
        }
      }
      @media (max-width: 770px) {
        main.docs-content {
          max-width: 100% !important;
          width: 100%;
        }
      }
      @media (min-width: 771px) and(max-width: 1139px) {
        main.docs-content.no-docs-toc {
          padding-bottom: 0 !important;
          max-width: calc(100% - 320px) !important;
          width: 100%;
        }
      }
    </style>
    <main class="docs-content col-12 col-md-9 {{ if .Params.toc }}col-xl-auto{{ else }}no-docs-toc col-xl-9{{ end }} py-md-3 pl-md-4" role="main">

      <article class="article">

        <div class="docs-article-container">
          <h1>{{ .Title }}</h1>

          <div class="article-style">
            {{ .Content }}
          </div>

          {{ partial "tags.html" . }}

          {{ if site.Params.docs_section_pager }}
          <div class="article-widget">
            {{ partial "section_pager" . }}
          </div>
          {{ end }}
        </div>

        <!--div class="body-footer"-->
          <!--p>{{ i18n "last_updated" }} {{ $.Lastmod.Format site.Params.date_format }}</p-->

          {{/* partial "page_edit" . */}}

          {{/* partial "comments" . */}}

          {{ partial "page_related" . }}
        <!--/div-->


        {{ partial "site_footer" . }}

      </article>
    </main>
  </div>
</div>
